using System;
using System.Collections.Generic;
using System.Text;
using WeifenLuo.WinFormsUI.Docking;
using OpenComposite.EII.Repository;
using OpenComposite.Base.Designer;
using System.Windows.Forms;
using System.ComponentModel;
using System.ComponentModel.Design;

namespace OpenComposite.EII.Designer
{
	public interface IController : IServiceProvider, IRootDesigner
	{
		// events
		event EventHandler Loaded;
		event EventHandler Saved;
		event CancelEventHandler Closing;
		event EventHandler Closed;

		// methods
		void Show(DockPanel dockPanel);
		void Close();

		bool Load(RepositoryItemBaseEx item, int repositoryId, int domainId);
		bool Load(ItemType diagramType, RepositoryItemBaseEx item, int repositoryId, int domainId);

		bool Save();

		// properties
		string ToolboxCategory { get; set; }
		RepositoryItemBase RepositoryItem { get; }
		ItemType ControllerType { get; }

		IRepositoryToolbox Toolbox { get; }
		DesignerViewDockContent DesignerDockContent { get; }
		DesignerViewControl DesignerView { get; }
		DesignerViewPanel DesignerPanel { get; }
		ToolStrip ToolStrip { get; }

		RepositorySurface Surface { get; }
	}
}
